﻿using Ecommerce.Domain.Eunm;
using Ecommerce.Domain.User;
using Ecommerce.Repository.Interface.Eunms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Ecommerce.Repository.Impl.Use
{
    public class EunmRepository : BaseRepository<Meunm>, IEnumRepository
    {
        public EunmRepository(EFContext context) : base(context)
        {
        }
        public async Task<int> AddAsync(Meunm eunm)
        {
            return await base.AddAsync(eunm);
        }

        public async Task<List<Meunm>> GetAllAsync()
        {
            return await base.GetAllAsync();
        }

        public async Task<List<Meunm>> GetAsync(Expression<Func<Meunm, bool>> expre)
        {
            return await base.GetAsync(expre);
        }

        public async Task<Meunm> GetModelAsync(int Id)
        {
            return await base.GetModelAsync(Id);
        }

        public async Task<int> Update(Meunm eunm)
        {
            return await base.Update(eunm);
        }
        public async Task<int> DelectAsync(int id)
        {
            return await base.DelectAsync(id);
        }
        public async Task<int> DeleteAsync(List<Meunm> meunms)
        {
            context.UpdateRange();
            return await context.SaveChangesAsync();
        }
    }
}
